
export function loadHostsNum (state, payload) {
  state.hostsNum = payload
}

export function loadMiddleStatus (state, payload) {
  state.middleWareStatus = []
  for (var i in payload) {
    if (payload[i]) {
      state.middleWareStatus.splice(0, 0, {avatar: 'arrow_upward', title: i, color: 'lime'})
    } else {
      state.middleWareStatus.splice(0, 0, {avatar: 'arrow_downward', title: i, color: 'error'})
    }
  }
}
